package com.yanqu.road.logic.sort;

import com.yanqu.road.entity.tradewar.TradeWarWanted;

import java.util.Comparator;

public class TradeWarWantedSort implements Comparator<TradeWarWanted> {
    @Override
    public int compare(TradeWarWanted o1, TradeWarWanted o2) {
        int ret = (int) (o1.getFinishTime() - o2.getFinishTime());
        if(0 == ret){
            return (int) (o1.getWantedTime() - o2.getWantedTime());
        }
        return ret;
    }
}
